package com.shop.loan.model.common;

import lombok.Data;

@Data
public class ResResultByYouXin {

    private String message;

    private Object data;

    private String code;

    private Long timestamp;

    private String sign;

    public ResResultByYouXin() {
    }

    public ResResultByYouXin(Code code, String sign, String data) {
        this.message = code.getMsg();
        this.code = code.getCode() + "";
        this.timestamp = System.currentTimeMillis();
        if (code.getCode().intValue() == Code.SUCCESS.getCode()) {
            this.code = "000000";
        }
        this.sign = sign;
        this.data = data;
    }

}
